<?php
$hostname_conn = "localhost";
$database_conn = "xdq";
$username_conn = "root";//没改的话一般时root
$password_conn = "123456";
//连接MYSQL数据库
$conn = mysqli_connect($hostname_conn, $username_conn, $password_conn,$database_conn)or trigger_error(mysqli_error(),E_USER_ERROR);
mysqli_query($conn,"set names 'utf8'");

$sql="insert into addLesson values ('667','666','666','666','2020-10-17 15:00:52')";
$isSuccess=mysqli_query($conn,$sql);
mysqli_close($conn);
if($isSuccess){
    echo "insert success";
}else{
    echo "insert fail";
}

?>